home *** CD-ROM | disk | FTP | other *** search
- class PickupInstance
- {
- var t;
- var mc;
- var a = 1.5707963267948966;
- var d = 0;
- static var sn = "pickup_sound_1";
- var col = false;
- function PickupInstance(dist, type)
- {
- this.d = dist;
- this.t = type;
- }
- function collected(player, root)
- {
- var _loc3_ = new Vector(0,0);
- this.mc.localToGlobal(_loc3_);
- root.bg.globalToLocal(_loc3_);
- root.bg.attachMovie("pickup1_pickedup","pu" + Math.round(this.d * 100000),root.bg.getNextHighestDepth(),{_x:_loc3_.x,_y:_loc3_.y});
- this.mc._visible = false;
- root.messages.gotoAndStop("lubed");
- player.ps += this.t.b;
- this.col = true;
- if(!root.sndOff)
- {
- var _loc4_ = new PickupSnd(root.createEmptyMovieClip("p" + Math.round(this.d * 100000) + "_snd_mc",root.getNextHighestDepth()));
- _loc4_.attachSound(PickupInstance.sn);
- _loc4_.start();
- }
- }
- function copy()
- {
- return new PickupInstance(this.d,this.t);
- }
- function toString()
- {
- return "Type: " + this.t.n + ", distance: " + this.d;
- }
- }
-